package com.automannn.atm_back.modules.codeGenerator.entity;

import com.automannn.atm_back.modules.codeGenerator.core.pojo.GlobalConfig;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 全局配置，用于定义模板宏变量及宏函数
 * @author chenkh
 * @time 2020/7/10 9:12
 */
@Data
@TableName("generator_global_config")
public class GlobalConfigEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    private String id;

    /**
     * 宏空间 id
     */
    private String globalConfigGroupId;

    /**
     * 描述
     */
    private String note;

    /**
     * 宏名称
     */
    private String name;
    /**
     * 值
     */
    private String value;

    private String createUser;
    private Date createTime;
    private String updateUser;
    private String updateTime;
    private String effective;

    public GlobalConfig toGlobalConfig(){
        GlobalConfig globalConfig = new GlobalConfig();
        globalConfig.setName(name);
        globalConfig.setValue(value);
        return globalConfig;
    }
}
